import qs from 'qs';
import fetch from '@/utils/fetch';

// 登录
export function login(data) {
  return fetch({
    url: `/user/login?${qs.stringify(data)}`,
    method: 'post',
  });
}

// 注册
export function register(data) {
  return fetch({
    url: `/user/register?${qs.stringify(data)}`,
    method: 'post',
  });
}

// 查询歌手列表
export function querySingers() {
  return fetch({
    url: '/user/singers',
    method: 'get',
  });
}

// 查询歌手详情
export function querySinger(uid) {
  return fetch({
    url: `/user/quinfo?uid=${uid}`,
    method: 'get',
  });
}

// 艺人认证
// id=&stageName=&company=&realName=&idCard=
export function certificateSinger(data) {
  return fetch({
    url: '/user/singer',
    method: 'post',
    data: qs.stringify(data),
  });
}
